/*
  学习目标：使用单独的文件,维护路由
  步骤：
*/

import VueRouter from "vue-router";
import Vue from "vue";

Vue.use(VueRouter);
import HmFind from "../views/HmFind.vue";
import HmFriend from "../views/HmFriend.vue";
import HmMy from "../views/HmMy.vue";
import HmHome from "../views/HmHome.vue";

const routes = [
  { path: "/find", component: HmFind },
  { path: "/friend", component: HmFriend },
  // <!-- 1./路径/:自定义属性， 将path改造为动态路由方式 -->
  { path: "/my/:id", component: HmMy },
  { path: "/home", component: HmHome },
];
const router = new VueRouter({
  routes,
});

export default router;
